package com.starlink.common.annotation.client.weixin;

import com.starlink.common.enums.OrderTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户下单model
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "下单响应Model")
public class UserPurchaseRes implements Serializable {

  @ApiModelProperty(value = "订单Id", required = true)
  private Long orderId;

  /**
   * @see OrderTypeEnum
   */
  @ApiModelProperty(value = "订单类别", required = true)
  private Integer orderType;

  @ApiModelProperty(value = "订单编号", required = true)
  private String orderNum;

  @ApiModelProperty(value = "订单超时时间")
  private Date timeout;

  @ApiModelProperty(value = "积分订单下单 纯积分下单成功:true , 积分+钱下单:false , 纯积分下单失败:false ")
  private Boolean integrationPayStatus;

  @ApiModelProperty("微信jsapi支付，商户申请的公众号对应的appid")
  private String appId;

  @ApiModelProperty("微信jsapi支付，时间戳")
  private String timeStamp;

  @ApiModelProperty("微信jsapi支付，随机字符串")
  private String nonceStr;

  @ApiModelProperty("微信jsapi支付，签名方式,默认为RSA，仅支持RSA")
  private String signType;

  @ApiModelProperty("微信jsapi支付，订单详情扩展字段：'prepay_id=xxxxxx'")
  private String detailExtend;

  @ApiModelProperty("微信jsapi支付，签名(签名，使用字段appId、timeStamp、nonceStr、package计算得出的签名值)")
  private String paySign;

  @ApiModelProperty("是否免费 0否 1是")
  private Integer isFree = 0;

}
